import 'package:get/get.dart';
import 'package:tot_android_flutter/pages/index/index_binding.dart';
import 'package:tot_android_flutter/pages/index/index_page.dart';
import 'package:tot_android_flutter/pages/login/login_binding.dart';
import 'package:tot_android_flutter/pages/login/login_page.dart';

class AppPages {
  static const String INITIAL = '/';
  static const String HOME = '/home';
  static const String PROJECT_LIST = '/project_list';


  static const String LOGIN = '/login';
  static const String INDEX = '/index';

  static final routes = [
    GetPage(name: INITIAL, page: () => const IndexPage(), binding: IndexBinding()),
    GetPage(name: LOGIN, page: () =>  LoginPage(),binding: LoginBinding()),
  ];

  // static Future<T?>? jumpPage<T>(String page,
  //     {dynamic arguments,
  //     bool preventDuplicates = true, // 防止重复打开
  //     Map<String, String>? parameters,
  //     bool needLogin = false,
  //     String? tag}) {
  //   tag = tag ?? DateTime.now().millisecondsSinceEpoch.toString();
  //   if (page == PROJECT_LIST) {
  //     return Get.to(ProjectListPage(),
  //         binding: ProjectListBinding(tag: tag),
  //         routeName: PROJECT_LIST,
  //         preventDuplicates: false,
  //         arguments: arguments);
  //   } else {
  //     return Get.toNamed(page,
  //         arguments: arguments,
  //         id: id,
  //         preventDuplicates: false,
  //         parameters: parameters);
  //   }
  // }
}
